<?php
include('../class/user.php');
include('../class/dbmodifier.php');
include('../class/country.php');
include('../class/role.php');
include('../class/job.php');
include('../class/quark.php');
include('../class/ressourcetype.php');
include('../class/ressourceext.php');
include('../class/jobsolution.php');
include('../class/function.php');
include('../class/quarktransmitted.php');
include('../class/quarkresponse.php');

$qid = $_POST['qid'];
$uid = $_POST['uid'];
$jsuid = $_POST['solution'];
echo "userid: ".$qid;
echo "quark id: ".$uid;
echo "jobsolution id: ".$jsuid;

$quark = quark::getQuarkById($qid);
//jobsolution = jobsolution::getJobSolutionById($jsuid);

//log the response from the user
$quarkres = quarkresponse::createQuarkResponse($uid,$qid,$jsuid);


//check if you have reach the count for the quark solution 
if($quark->getResponseCount() >= $quark->getThresholdCount()){
	echo "reached your";
}else{
	echo "haven't reached the threshold yet";
}
?>